home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / extra_2 / flmgmtcl.zip / PATHITER.H < prev    next >
C/C++ Source or Header  |  1995-11-02  |  2KB  |  97 lines

  1. // ==========================================================================
  2. //                             Class Specification : CPathIterator
  3. // ==========================================================================
  4.  
  5. // Header file : pathiter.h
  6.  
  7. // Source : Periphere NV (F.Melendez & R.Mortelmans)
  8. // Creation Date :        2nd November 1995
  9. // Last Modification : 2nd November 1995
  10.                           
  11. // //////////////////////////////////////////////////////////////////////////
  12.  
  13. // Properties:
  14. //    NO    Abstract class (does not have any objects)
  15. //    YES    Derived from CObject
  16.  
  17. //    NO    Is a Cwnd.                     
  18. //    NO    Two stage creation (constructor & Create())
  19. //    NO    Has a message map
  20. //    NO  Needs a resource (template)
  21.  
  22. //    NO    Persistent objects (saveable on disk)      
  23. //    NO    Uses exceptions
  24.  
  25. // //////////////////////////////////////////////////////////////////////////
  26.  
  27. // Desciption :         
  28. //        This class encapsulates the a path iterator
  29.  
  30. // Remark:
  31. //        
  32.  
  33. // Prerequisites (necessary conditions):
  34. //        
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. #ifndef __PATHITER_H__
  38. #define __PATHITER_H__         
  39.  
  40. #ifndef WIN32
  41.     #include <dos.h>
  42. #endif
  43.  
  44. class CPathSpec;
  45. class CPathIterator : public CObject
  46. {
  47. friend class CPathSpec;
  48.  
  49. DECLARE_DYNAMIC(CPathIterator)
  50.  
  51. // Data members -------------------------------------------------------------
  52. public:
  53.     
  54. protected:                   
  55.  
  56. #ifdef WIN32
  57.     HANDLE             m_hFindFile;
  58.     WIN32_FIND_DATA m_FindFileData;    
  59. #else
  60.     _find_t            m_FileInfo;
  61. #endif
  62.  
  63.     BOOL             m_bValid;
  64. private:
  65.     
  66. // Member functions ---------------------------------------------------------
  67. public:
  68.     CPathIterator();
  69.     // --- In  :
  70.     // --- Out : 
  71.     // --- Returns :
  72.     // --- Effect : Contructor of object
  73.     //                It will initialize the internal state
  74.     
  75.     BOOL IsItValid();
  76.     // --- In  :
  77.     // --- Out : 
  78.     // --- Returns : whether the iterator can be used in a iteration proces
  79.     //                 or not.
  80.     // --- Effect : 
  81.     
  82. #ifdef _DEBUG
  83.     virtual void Dump(CDumpContext&) const;
  84.     virtual void AssertValid() const;
  85. #endif //_DEBUG
  86.  
  87.     virtual ~CPathIterator();
  88.     // --- In  :
  89.     // --- Out : 
  90.     // --- Returns :
  91.     // --- Effect : Destructor of object
  92.  
  93. };
  94.  
  95. #endif
  96. // ==========================================================================
  97.